package com.kaitian.demo.demo_boot_starter.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author ：xietian
 * @version ：V1.0
 * @program ：demo
 * @date ：Created in 2022/4/11 16:11
 * @description ：示例拦截器
 */
@Configuration
public class DemoConfigurerInterceptor implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 添加拦截器，多个拦截器以在此处的添加顺序为准
        registry.addInterceptor(new DemoHandlerInterceptor());
    }
}